﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/NoLeftMasterPage.master"
    AutoEventWireup="true" CodeFile="StageSplit_UnHappend.aspx.cs" Inherits="StageSplit_UnHappend" %>

<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="Server">
    <div class='left_tree' id="left_container">
        <div class="left_tree_title">
            科目树</div>
        <asp:TreeView ID="tvAccountList" CssClass="left_tree_content" runat="server" OnSelectedNodeChanged="tvAccountList_SelectedNodeChanged">
            <SelectedNodeStyle CssClass="left_tree_selectNode" />
        </asp:TreeView>
    </div>
    <div class="right_container" id="right_container">
        <div class="right_title">
            <asp:Label ID="lbTitle" runat="server" Text="Label"></asp:Label>
            预计待发生成本
            <asp:HyperLink ID="hl_url" runat="server" Target="_blank">查看该科目各业态成本</asp:HyperLink>
        </div>
        <div class="right_contract">
            <asp:GridView ID="gvContractList" runat="server" AutoGenerateColumns="False" CssClass="List"
                AllowPaging="True" OnPageIndexChanging="gvContractList_PageIndexChanging" PageSize="7" onrowdatabound="gvContractList_RowDataBound">
                <Columns>
                    <%--                    <asp:BoundField DataField="ContractName" HeaderText="合同名称" 
                        ItemStyle-HorizontalAlign="Left" >
<ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:BoundField>--%>
                    <asp:BoundField DataField="ContractNum" HeaderText="合同编号" ItemStyle-HorizontalAlign="Center">
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="合同名称">
                        <ItemTemplate>
                            <span title='<%#Eval("ContractName").ToString() %>'>
                                <%#Eval("ContractName") != null && Eval("ContractName").ToString().Length > 20 ? Eval("ContractName").ToString().Substring(0, 17) + "..." : Eval("ContractName").ToString()%></span>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:BoundField DataField="tz_amount" HeaderText="预计待发生金额（元）" ItemStyle-HorizontalAlign="Right">
                        <ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
                    <%--                    <asp:BoundField DataField="ht_plan_amount" HeaderText="合约规划限额（元）" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="tz_amount" HeaderText="调整金额（元）" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>--%>
                    <%--                    <asp:BoundField DataField="Scope" HeaderText="合同范围"  
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>--%>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="合同范围">
                        <ItemTemplate>
                            <span title='<%#Eval("Scope").ToString() %>'>
                                <%#Eval("Scope") != null && Eval("Scope").ToString().Length > 10 ? Eval("Scope").ToString().Substring(0,7)+"..." : Eval("Scope").ToString()%></span>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <a target="_blank" href='AccountSplit_UnHappend.aspx?id=<%#Eval("Id").ToString() %>'>
                                开始核算</a>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <div style="width: 100%; text-align: left;">
                        该科目上没有相关合同行！</div>
                </EmptyDataTemplate>
            </asp:GridView>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="script" runat="Server">
    <link href="/Resource/css/cs_stage.css" rel="stylesheet" type="text/css" />
    <script src="../js/fix.js" type="text/javascript"></script>
    <script type="text/javascript">
        function load() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        }

        function EndRequestHandler() {
            Fixed();
        }
        $(document).ready(function () {
            Fixed();
        });
    </script>
</asp:Content>
